package com.daka.dao;

import com.daka.entity.User;
import com.daka.mybatis.SQLMapper;
import com.daka.vo.db.UserInfoVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.math.BigDecimal;
import java.util.List;

@Repository(value = "userDao")
@SQLMapper
public interface UserDao {
    int deleteByPrimaryKey(Long id);

    int insert(User record);

    User selectByPrimaryKey(Long id);

    User selectByUserNameAndTeam(@Param("name") String userName,@Param("team") Long teamId);

    List<User> selectByStatement(User record);

    int selectByStatementCount(User record);

    List<User> selectByTeam(Long teamId);

    int updateByPrimaryKeySelective(User user);

    int selectUnDonationCount(Long teamId);

    List<User> findBiggerByMoney(BigDecimal money);

    List<UserInfoVo> findUserInfoVo();

    List<User> selectByTeamDonated(Long teamId);

}